home *** CD-ROM | disk | FTP | other *** search
- Path: coke.engr.utk.edu!mbk
- From: mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel)
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Subject: Re: Hungarian notation
- Followup-To: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Date: 17 Jan 1996 20:26:32 GMT
- Organization: University of Tennessee, Knoxville
- Message-ID: <4djm1o$kf3@gaia.ns.utk.edu>
- References: <30C40F77.53B5@swsbbs.com> <marnoldDJEvtJ.1Lx@netcom.com> <4aleun$jlk@ns.RezoNet.NET> <marnoldDJMDBG.CFz@netcom.com> <4asnkr$7b0@solutions.solon.com> <4ath75$e7i@barnacle.iol.ie> <4b4kij$svt@news.microsoft.com> <dewar.819489496@schonberg> <4bd <4cf8hf$8fe@hopi.gate.net> <4cgq30$c0v@weck.brokersys.com> <4cvu68$2jb@macaw.cyberport.com> <4d21og$iab@news.xmission.com>
- Reply-To: kennel@msr.epm.ornl.gov
- NNTP-Posting-Host: 128.169.100.253
- X-Newsreader: TIN [version 1.2 PL2]
-
- Todd Knarr (tknarr@xmission.com) wrote:
- : In <4cvu68$2jb@macaw.cyberport.com>, tangent@cyberport.com (Warren Young) writes:
- : >This is one of the reasons HN is useful. By forcing the programmer to
- : >visit every place that the variable is used, the programmer has an
- : >opportunity to check the semantics of the variable's use. If the type
- : >of the variable has changed, chances are that the semantics have
- : >changed as well. How many times have you changed a variable's type to
- : >fix something, only to break something else?
-
- : I find this is false in practice. In general, when I change the declared
- : type of a variable, I'm doing the equivalent of changing an int to a long.
- : The result of that in the presence of HN is a massive amount of monkey-work
- : to visit and change every occurrence of the variable when the only reason
- : for the change is to replace iCount with lCount and nothing more. Since I
- : hate doing manual typographic changes like that and it can be difficult or
- : impossible to write a script to do it automatically in all files involved,
- : I find most often that it does not get done ( and I can't really blame
- : the people who didn't do it ).
-
- : Changes in semantics do happen, but usually as a side-effect of a major
- : change in the fundamental way the code itself works, not as a side-effect
- : of a simple type change. As such they require code changes completely
- : above and beyond the variable names.
-
- Indeed I agree. I find that I do not always enjoy even having to manifestly
- declare types for variables everywhere. I like static type inference as in
- Eiffel and Sather (and others), where the static type of a variable is
- derived from the types of other parts of the system.
-
- This way, when other parts of the program change in type, the 'irritating'
- little type dependencies may change automatically.
-
- Hungarian notation which encodes types is manifest type declaration
- gone haywire.
-
- Naming conventions may be important, but I think local variable names is
- the *last* place to worry about this.
-
- More important are types, modules, class categories and patterns.
-
- : --
- : Todd Knarr : tknarr@xmission.com | finger for PGP public key
- : | Member, USENET Cabal
-
- : Seriously, I don't want to die just yet. I don't care how
- : good-looking they are, I! don't! want! to! die!"
- : -- Megazone ( UF1 )
-
-